package com.feiyu.universal.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.feiyu.universal.dto.CommentDTO;
import com.feiyu.universal.entity.Comment;
import com.feiyu.universal.mapper.CommentMapper;
import com.feiyu.universal.service.CommentService;
import com.feiyu.universal.vo.CommentVO;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tang ming
 * @since 2021-11-30
 */
@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements CommentService {


    @Override
    public IPage<CommentVO> pageComment(IPage<Comment> page, CommentDTO param) {
        return baseMapper.pageComment(page,param);
    }

    @Override
    public IPage<CommentVO> managePage(Page<Comment> page, Long userId,Boolean flag) {
        return baseMapper.managePage(page,userId,flag);
    }

    @Override
    public Boolean restoreComment(Long id) {
        return baseMapper.restoreComment(id);
    }
}
